package com.lzw.DailyAudit.service.dateAggregation_02.DailyAudit.mapper;


import com.baomidou.dynamic.datasource.annotation.DS;
import com.hooya.fa.eu.biz.DailyAudit.entity.CheckProfitBO;
import com.hooya.fa.eu.biz.DailyAudit.entity.ProfitCheckRecord;
import com.hooya.fa.eu.biz.DailyAudit.entity.ProfitStatement;
import com.hooya.fa.eu.biz.DailyAudit.entity.dto.ProfitCheckDTO;
import com.hooya.fa.eu.biz.DailyAudit.entity.dto.ProfitStatementDaily;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
@DS("fa_eu_daily")
public interface DailyProfitCheckMapper {

    @Select("select id,sku,invoice_no as invoiceNo from fa_eu_daily.profit_check where belongs = #{company}")
	List<ProfitStatement> getAllData(String company);


    void batchSaveProfitCheck(@Param("list") List<ProfitStatement> list);

    void batchSaveProfitCheckDaily(@Param("list") List<ProfitStatementDaily> list);

    void batchSaveRecord(@Param("list") List<ProfitCheckRecord> list);

    void batchUpdateProfitCheck(@Param("list") List<ProfitStatement> list);

    List<CheckProfitBO> getCheckProfitList(@Param("date") String date);

    void UpdateProfitCheck(@Param("data") ProfitStatement data);

    List<ProfitCheckDTO> getDataByDate(String date);

}
